<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ include file="../include/header.jsp" %>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
</head>
<body>
	<table style="width: 100%;" >
		<tr>
			<th style="padding: 10px;" width="30%">
				<input type="button" 
				style="width: 80%; height: 35px; background-color:#773333; color: white; font-weight:bold; " 
				value="MEMBER RANKING"		onclick="location.href='${path}/member/member_list.jsp';">
			</th>
			<th style="padding: 10px;"width="30%">
				<input type="button"
				style="width: 80%; height: 35px; background-color:#337733; color: white; font-weight:bold; " 
				 value="RECIPE RANKING"		onclick="location.href='${path}/recipe/recipe_list.do';">
			</th>
			<th style="padding: 10px;"width="30%">
				<input type="button" 
				style="width: 80%; height: 35px; background-color:#333377; color: white; font-weight:bold; " 
				value="CLASS RANKING" 	onclick="location.href='${path}/class/class_list.do';">
			</th>
		</tr>
	</table>
	<table  style="width: 100%; height: 500px;">
		<tr height="70%">
			<th width="40%" style="padding: 7px;">
				<div style="margin: 0 auto; background-color:#ffdede; height: 100%; padding:10px; ">
						<c:forEach var="row" items="${map.memberList }">
							<table style=" width:100%; margin:10 auto; border-bottom:solid #ffffff;   ">
								<tr>
									<th style="font-weight: bold; width: 25px; font-size:20px;" rowspan="2">${row.no }</th>
									<th rowspan="2"style="height:75px;width:75px; ">
										<a href="${path }/member/memberDetail.do?userid=${row.userid}">
										<img src="${path }/images/member/${row.userid}/${row.image}" style="width: 75px; height:75px;">
										</a>
									</th>
									<th>
										${row.userid }
									</th>
									<th style="color: #cc805b; font-weight: bold;">
										<c:forEach begin="1" end="${row.rate_avg }" >
											★
										</c:forEach>										
									</th>
								</tr>
								<tr>
									<th>
										<img alt="${row.level }_level" src="${path }/images/lv/${row.level}.gif">
										<c:choose>
											<c:when test="${row.level == 0}">Admin</c:when>
											<c:when test="${row.level == 1}">마스터쉐프</c:when>
											<c:when test="${row.level == 2}">쉐프</c:when>
											<c:when test="${row.level == 3}">선임요리사</c:when>
											<c:when test="${row.level == 4}">견습요리사</c:when>
											<c:when test="${row.level == 5}">주방보조</c:when>				
										</c:choose>
									</th>
									<th>
										${row.rate_sum }점
									</th>									
								</tr>
							</table>							
						</c:forEach>			
				</div>			
			</th>				
			<th style="padding: 7px;">
				<div style="margin: 0 auto; background-color:#deffde; height: 100%; ">
					<table  style=" padding: 0px; margin: 0 auto; height:100%; width: 100%;">
						<tr >
							<th style="border-bottom: solid white; border-right: solid white;" >							
								<c:forEach begin="1" end="${map.recipeList[0].rate}" >
									<font style="color: #cc805b; font-size: x-large;">★</font>
								</c:forEach><br>
								<a href="${path}/recipe/recipe_detail.do?idx=${map.recipeList[0].idx}">
								<img  src="${path}/images/recipe/${map.recipeList[0].idx}/${map.recipeList[0].image}"
								style="width: 210px; height: 180px; border: solid white;"></a><br>
								${map.recipeList[0].subject}[Re:${map.recipeList[0].count}]
							</th>
							<th style="border-bottom: solid white; border-left: solid white;">							
								<c:forEach begin="1" end="${map.recipeList[1].rate}" >
									<font style="color: #cc805b; font-size: x-large;">★</font>
								</c:forEach><br>
								<a href="${path}/recipe/recipe_detail.do?idx=${map.recipeList[1].idx}">
								<img  src="${path}/images/recipe/${map.recipeList[1].idx}/${map.recipeList[1].image}"
								style="width: 210px; height: 180px; border: solid white;"></a><br>
								${map.recipeList[1].subject}[Re:${map.recipeList[1].count}]
							</th>					
						</tr>						
						<tr >
							<th style="border-top: solid white; border-right: solid white;">							
								<c:forEach begin="1" end="${map.recipeList[2].rate}" >
									<font style="color: #cc805b; font-size: x-large;">★</font>
								</c:forEach><br>
								<a href="${path}/recipe/recipe_detail.do?idx=${map.recipeList[2].idx}">
								<img  src="${path}/images/recipe/${map.recipeList[2].idx}/${map.recipeList[2].image}"
								style="width: 210px; height: 180px; border: solid white;"></a><br>
								${map.recipeList[2].subject}[Re:${map.recipeList[2].count}]
							</th>
							<th style="border-top: solid white; border-left: solid white;">							
								<c:forEach begin="1" end="${map.recipeList[2].rate}" >
									<font style="color: #cc805b; font-size: x-large;">★</font>
								</c:forEach><br>
								<a href="${path}/recipe/recipe_detail.do?idx=${map.recipeList[2].idx}">
								<img  src="${path}/images/recipe/${map.recipeList[2].idx}/${map.recipeList[2].image}"
								style="width: 210px; height: 180px; border: solid white;"></a><br>
								${map.recipeList[2].subject}[Re:${map.recipeList[2].count}]
							</th>
						</tr>
					</table>				
				</div>
			</th>
		</tr>
		<!-- 
		<tr>
			<th colspan="2" style="padding: 7px;">
				<div style="margin: 0 auto; background-color:#dedeff; height: 100%; ">
					
				
				
				</div>	
			</th>
		</tr>
		 -->
	</table>

</body>
</html>